﻿using System.Web;

namespace Cultiv.RestContour
{
    public class GetContourForm
    {
        public static string GetAllForms()
        {
            var stringType = HttpContext.Current.Request["type"];

            return Helper.GetAllForms(stringType);
        }
        
        public static string GetFormFields()
        {
            var formGuid = HttpContext.Current.Request["formGuid"];
            var stringType = HttpContext.Current.Request["type"];

            return Helper.GetFormFields(formGuid, stringType);
        }

        public static string GetPrevaluesForField()
        {
            var formGuid = HttpContext.Current.Request["formGuid"];
            var fieldId = HttpContext.Current.Request["fieldId"];
            var stringType = HttpContext.Current.Request["type"];

            return Helper.GetPrevaluesForField(formGuid, fieldId, stringType);
        }

        public static string GetField()
        {
            var formGuid = HttpContext.Current.Request["formGuid"];
            var fieldId = HttpContext.Current.Request["fieldId"];
            var stringType = HttpContext.Current.Request["type"];

            return Helper.GetField(formGuid, fieldId, stringType);
        }
    }
}

